import request from '@/utils/request'

export function fetchList(page, size, searchName) {
  return request({
    url: `/api/job/jobList/${page}/${size}?name=${searchName}`,
    method: 'post'
  })
}
export function fetchMyList(searchName) {
  return request({
    url: `/api/job/jobListByMyPost?name=${searchName}`,
    method: 'post'
  })
}
// 彻底删除职位
export function del(id) {
  return request({
    url: `/api/job/del/${id}`,
    method: 'post'
  })
}
// 上线职位以及下线职位
export function online(id, val) {
  return request({
    url: `/api/job/admin/online/${id}/${val}`,
    method: 'post'
  })
}

export function insert(data) {
  return request({
    url: `/api/job/post`,
    method: 'post',
    data: data
  })
}

export function update(data) {
  return request({
    url: `/api/job/update`,
    method: 'post',
    data: data
  })
}


